admin = User.query.filter_by(username='admin').first() admin.email = '[email protected]' db.session.commit() user = User.query.get(5) user.name = 'New Name' db.session.commit()